/**
 * Project: Utilities <br>
 * Package: org.leumasjaffe.builder
 */
package org.leumasjaffe.builder;

import org.eclipse.jdt.annotation.NonNullByDefault;

@NonNullByDefault
/**
 * Class org.leumasjaffe.builder..DelegateBuilder in file DelegateBuilder.java <br>
 * 
 * @author leumasjaffe
 * @version Jun 9, 2013
 * Created on: Jun 9, 2013
 * 
 * @param <T>
 */
public abstract class DelegateBuilder<T> implements Builder<T> {

	protected final Object[] contents;

	/**
	 * @param length 
	 * 
	 */
	protected DelegateBuilder(int length) {
		this.contents = new Object[length];
	}

	@Override
	public Builder<T> set(int paramNumber, Object arg) {
		this.contents[paramNumber] = arg;
		return this;
	}
	
	protected abstract T __build();
	
	@Override
	public T build() {
		return __build();
	}

}